#ifndef GLOBAL_DEFINES_H_
#define GLOBAL_DEFINES_H_

/*
 * Global defines for the I2C communication system.
 */

#define I2C_READ_MODE         0x80  // 0b1000 0000 Set this to read from that address.


/*
 * Global defines for the Accelerometer
 */

// Board information
#define ACCEL_I2C_ADDRESS     0x40

// Generic Registers
#define ACCEL_REG_TEMP 		   0x08

// Axis Registers
#define ACCEL_REG_Z_MSB       0x07
#define ACCEL_REG_Z_LSB       0x06
#define ACCEL_REG_Y_MSB       0x05
#define ACCEL_REG_Y_LSB       0x04
#define ACCEL_REG_X_MSB       0x03
#define ACCEL_REG_X_LSB       0x02

// Masks and Bits
#define ACCEL_MASK_LSB        0xFC     // 0b1111 1100
#define ACCEL_MASK_NEG_BIT    0x2000   // 0b0010 0000 0000 0000
#define ACCEL_MASK_NEG_MASK   0xE000   // 0b1110 0000 0000 0000
#define ACCEL_MASK_REAL_NUM   0x1FFF   // 0b0001 1111 1111 1111



/*
 * Global defines for the Gyroscope
 */

// Board information
#define GYRO_I2C_ADDRESS      0x68  // 0b01101000

// Generic Registers
#define GYRO_REG_TEMP_H       0x1B
#define GYRO_REG_TEMP_L       0xC1
#define GYRO_REG_X_H          0x1D
#define GYRO_REG_X_L          0x1E
#define GYRO_REG_Y_H          0x1F
#define GYRO_REG_Y_L          0x20
#define GYRO_REG_Z_H          0x21
#define GYRO_REG_Z_L          0x22
#define GYRO_REG_SMPLRT_DIV   0x15  // Sets the divisor of the sample rate. F_sample = F_clock/(SMPLRT_DIV+1)


// Axis Registers

// Masks and Bits


#endif
